home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeed.direct.ca!usenet
- From: etoivane@direct.ca (Ed Toivanen)
- Newsgroups: comp.lang.c
- Subject: Re: [Help] I can't find my error.
- Date: 22 Feb 1996 23:52:37 GMT
- Organization: Your Organization
- Message-ID: <4givk5$bqk@aphex.direct.ca>
- References: <4ggvgr$1b2@aurora.engr.LaTech.edu>
- NNTP-Posting-Host: 204.174.243.36
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.6
-
-
- #include <stdio.h>
- #include <stdlib.h>
-
- #define NAMESIZE 100
- #define BUFSIZE 4
-
- int main(void)
- {
- char buf[BUFSIZE];
- char name[NAMESIZE];
- int age, next_age;
-
- printf("Please enter your name:\t");
- name = fgets(buf, sizeof(buf), stdin);
- printf("\nPlease enter your age:\t");
- age = atoi(fgets(buf, sizeof(buf), stdin));
- next_age += age;
- printf("\nHi, %s ,next year, you will be %d\n", name, next_age);
-
- return(0);
- }
-
-
-